<?php
########################################################################################
# Empresa :     Tecnopac Informatica;                                                  #
# Autor:        Deiverson Pacheco;                                                     #
# Data Criação: 10/12/2010;                                                            #
########################################################################################

header("Cache-control: private");
header("Content-Type: text/html; charset=ISO-8859-1",true);

//======================================================================================
//==> Include obrigatórias no script
//======================================================================================
include_once('../includes/classes/class.TemplatePower.php');
include_once('../includes/classes/class.Conexao.php');
include_once('../includes/classes/class.Geral.php');
include_once('../includes/classes/class.Paginador.php');

//======================================================================================
//==> Inicializar Classes
//======================================================================================
$not  = new Persist;
$data = new getData;
$cor  = new ColorTr;
$util = new Util;
$vld  = new ValidarDados;
$sql  = new SqlInjection;
$Paginacao = new Paginacao(6,3);

//======================================================================================
//==> Instanciar TemplatePower para juntar o PHP + HTML
//======================================================================================
$tpl  = new TemplatePower('index.html');
$tpl->prepare();

$not->sql = "SELECT * FROM parametros";
$not->ler();
$not->ini();



$tpl->assign('title',$not->nome_razao);
$tpl->assign('ano',date("Y"));
$tpl->assign('cliente',$not->nome_razao);

$tpl->newBlock("CATEGORIAS");
$tpl->assign('categorias',include_once('modulo/carrega_categoria/ctrl.CarregaCategorias.php'));

$tpl->newBlock("DESTAQUE");
$tpl->assign('destaque',include_once('modulo/carrega_destaque/ctrl.CarregaDestaque.php'));

$tpl->newBlock("PAGINA");
$tpl->assign('modulo',include_once('modulo/carrega_lista_produtos/ctrl.CarregaListaProdutos.php'));

//$tpl->newBlock("FORNECEDORES");
//$tpl->assign('fornecedores',include_once('modulo/carrega_fornecedores/ctrl.CarregaFornecedores.php'));

$tpl->newBlock("PESQUISA");
$tpl->assign('pesquisa',include_once('modulo/carrega_pesquisa/ctrl.CarregaPesquisa.php'));

$tpl->newBlock("CART");
$tpl->assign('car_itens',include_once('modulo/carrega_carrinho/ctrl.CarregaCarrinho.php'));


$tpl->newBlock("BANNER");
$tpl->assign('banner',include_once('modulo/carrega_banner/ctrl.CarregaBanner.php'));


//======================================================================================
//==> Enviar página unificada PHP + HTML
//======================================================================================
$tpl->showUnAssigned( false );  // para debug. na hora de publicar, setar para false
$tpl->printToScreen();
?>